| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

ThemeManager.h
1 // ThemeManager.h
3 //
5
6 namespace nkWinUi
7 {
13 class ThemeManager final : public nkCommon::MaybeSingletonClass<ThemeManager>
14 {
15 public :
16
17 // Getters
21 System* getSystem () const ;
25 Theme* getActiveTheme () const ;
26
27 // Setters
33 void setActiveTheme (Theme* theme) ;
34
35 // Memory management
42 Theme* createOrRetrieve (nkMemory::StringView name) ;
50 Theme* record (nkMemory::StringView name, nkMemory::UniquePtr<Theme> resource) ;
57 Theme* get (nkMemory::StringView name) const ;
67 Theme* getByIndex (unsigned int index) const ;
74 void rename (nkMemory::StringView currentName, nkMemory::StringView newName) ;
80 void erase (nkMemory::StringView name) ;
87 nkMemory::UniquePtr<Theme> relinquish (nkMemory::StringView name) ;
88 } ;
89 }
nkWinUi::ThemeManager::relinquish
nkMemory::UniquePtr< Theme > relinquish(nkMemory::StringView name)
nkWinUi::ThemeManager::getSystem
System * getSystem() const
nkWinUi::ThemeManager::record
Theme * record(nkMemory::StringView name, nkMemory::UniquePtr< Theme > resource)
nkWinUi::ThemeManager::getActiveTheme
Theme * getActiveTheme() const
nkWinUi::ThemeManager::setActiveTheme
void setActiveTheme(Theme *theme)
nkWinUi::System
The main system of the component.
Definition: System.h:18
nkWinUi::ThemeManager::createOrRetrieve
Theme * createOrRetrieve(nkMemory::StringView name)
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkWinUi::ThemeManager::getByIndex
Theme * getByIndex(unsigned int index) const
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkWinUi::Theme
A theme used to style the windows in the component.
Definition: Theme.h:44
nkWinUi::ThemeManager::rename
void rename(nkMemory::StringView currentName, nkMemory::StringView newName)
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Clipboard.h:7
nkWinUi::ThemeManager::erase
void erase(nkMemory::StringView name)
nkWinUi::ThemeManager::get
Theme * get(nkMemory::StringView name) const
nkWinUi::ThemeManager
Manages the themes within the component.
Definition: ThemeManager.h:14